<html lang="zh-cn">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Getting started</title>
  <uieip type="file" value="inc" src="/yqwin/easyui/include.txt" cache="true" minute="1440"></uieip>
  <uieip type="file" value="css" src="/yqwin/css/yqwin.min" cache="false"></uieip>
  <uieip type="file" value="js" src="/yqwin/data/yqwin.min" cache="false"></uieip>
  <script src="/scripts/d3js/d3.min.js"></script>
</head>

<body>
  <a href="javascript:window.history.back();">返回</a>
  <div id="container"></div>

  <script>

    // Declare the chart dimensions and margins.
    var width = 640;
    var height = 400;
    var marginTop = 20;
    var marginRight = 20;
    var marginBottom = 30;
    var marginLeft = 40;

    // Declare the x (horizontal position) scale.
    var x = d3.scaleUtc()
      .domain([new Date("2023-01-01"), new Date("2024-01-01")])
      .range([marginLeft, width - marginRight]);

    // Declare the y (vertical position) scale.
    var y = d3.scaleLinear()
      .domain([0, 100])
      .range([height - marginBottom, marginTop]);

    // Create the SVG container.
    var svg = d3.create("svg")
      .attr("width", width)
      .attr("height", height);

    // Add the x-axis.
    svg.append("g")
      .attr("transform", `translate(0,${height - marginBottom})`)
      .call(d3.axisBottom(x));

    // Add the y-axis.
    svg.append("g")
      .attr("transform", `translate(${marginLeft},0)`)
      .call(d3.axisLeft(y));

    // Append the SVG element.
    container.append(svg.node());

  </script>

</body>

</html>